Skip to content

feat(clerk-js,clerk-react): Replace mount with open for GoogleOneTap - #3379

Merged
panteliselef merged 4 commits into
mainfrom
elef/open-google-one-tap
May 16, 2024
Merged

feat(clerk-js,clerk-react): Replace mount with open for GoogleOneTap#3379
panteliselef merged 4 commits into
mainfrom
elef/open-google-one-tap

Conversation

@panteliselef

@panteliselef panteliselef commented May 14, 2024

Copy link
Copy Markdown
Contributor

Description

The interaction with Google One Tap resembles a modal like experience and that is why we decided to drop the "mount" method and use "open" for the low level clerk-js API.

We still want to support the GoogleOneTap react component that a user can simply mount in their application.

To achieve both things mentioned above, a few changes were necessary to be made in the internal Portal components of clerk-js and clerk-react

This PR introduces:

  • Clerk.__experimental_openGoogleOneTap(props)
  • Clerk.__experimental_closeGoogleOneTap()
    and drops
  • Clerk.__experimental_mountGoogleOneTap(element, props)
  • Clerk.__experimental_unmountGoogleOneTap(element)

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@panteliselef panteliselef self-assigned this May 14, 2024
@changeset-bot

changeset-bot Bot commented May 14, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3bdeb5d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@clerk/clerk-js Minor
@clerk/clerk-react Minor
@clerk/types Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/elements Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/backend Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/clerk-sdk-node Patch
@clerk/testing Patch
@clerk/themes Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@panteliselef
panteliselef force-pushed the elef/open-google-one-tap branch from e66e26e to 34c7829 Compare May 14, 2024 16:54
Comment thread packages/clerk-js/src/ui/lazyModules/providers.tsx

@octoper octoper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Comment thread packages/clerk-js/src/ui/lazyModules/providers.tsx
Comment thread packages/clerk-js/src/ui/contexts/ClerkUIComponentsContext.tsx
@panteliselef
panteliselef enabled auto-merge (squash) May 16, 2024 09:43
@panteliselef
panteliselef merged commit 3d790d5 into main May 16, 2024
@panteliselef
panteliselef deleted the elef/open-google-one-tap branch May 16, 2024 09:54
@clerk-cookie clerk-cookie mentioned this pull request May 16, 2024
panteliselef added a commit that referenced this pull request May 21, 2024
…3379)

* feat(clerk-js,clerk-react): Replace mount with open for GoogleOneTap

* feat(clerk-js,clerk-react): Add changeset

* feat(clerk-js,clerk-react): Reuse initialized GIS instance

(cherry picked from commit 3d790d5)
@panteliselef panteliselef mentioned this pull request May 21, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants